package com.dhcc.bpm.modules.content.service;

import com.dhcc.bpm.modules.content.vo.DecompressQueryVo;
import com.dhcc.bpm.modules.content.entity.DocManagement;
import com.dhcc.bpm.modules.content.vo.DocManagementVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;


/**
 * @ClassName IDocManagementService
 * @Description  文档管理 服务类
 * @Author lijiacheng
 * @Date 2020/2/21 14:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 */

public interface IDocManagementService extends BaseService<DocManagement> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param docManagement
	 * @return
	 */
	IPage<DocManagementVO> selectDocManagementPage(IPage<DocManagementVO> page, DocManagementVO docManagement);

	/**
	 * 根据id查看路径
	 * @param opcPluploadId
	 * @return
	 */
    DecompressQueryVo selectFilePathById(Long opcPluploadId);

	/**
	 * 解压缩
	 * @param decompressUrl
	 * @param name
	 */
	void decompress(String decompressUrl, String name);

	/**
	 * 文档格式检验
	 * @param path
	 * @return
	 */
	boolean checkDocFile(String path);

	/**
	 * 删除压缩文件
	 * @param decompressUrl
	 * @return
	 */
	boolean deleteDirectory(String decompressUrl);

	/**
	 * 根据目录编号查询文档信息
	 * @param opcDirectoryCode
	 * @return
	 */
	DocManagement seleDocByCode(String opcDirectoryCode);

	DocManagementVO getDetailSelfById(Long id);

	/**
	 * 从文件服务器下载word
	 * @param filePath
	 * @param fileName
	 */
	void downloadAndSaveWord(String filePath,String name,String fileName);
}
